from django.test import TestCase
import random
from faker import Faker
from pypinyin import pinyin, Style

fake = Faker(['zh-cn'])


def generate_name():
    name = fake.name()
    pinyin_name = ''.join([item[0] for item in pinyin(name, style=Style.NORMAL)])
    print(pinyin_name)


if __name__ == '__main__':
    generate_name()
